home *** CD-ROM | disk | FTP | other *** search
/ Joint Education Initiative / Joint Education Initiative.iso / dos / mips / doc / imdisp.doc next >
Text File  |  1991-03-04  |  83KB  |  1,846 lines

  1.  
  2.                            PLANETARY DATA SYSTEM
  3.  
  4.                   USER'S GUIDE FOR THE PDS IMDISP PROGRAM
  5.  
  6.  
  7.                                  Chapter 1
  8.  
  9.                                 INTRODUCTION
  10.  
  11.  
  12.      This document describes version 5.6 of the IMDISP program, an
  13. interactive image display utility for the IBM Personal Computer family (PC,
  14. XT and AT) and compatibles.  It has been developed for use with the Compact
  15. Disk - Read-Only Memory (CD-ROM) storage systems currently being evaluated
  16. by the Planetary Data System (PDS). It can also be used to display images
  17. stored on floppy or hard disks.
  18.  
  19.      This User's Guide presents an overview of image processing and CD-ROM
  20. fundamentals, a section on the installation of IMDISP and CD-ROM software
  21. and hardware, a description of IMDISP program operation, a description of
  22. other utility programs which can be used in conjunction with IMDISP, and a
  23. command summary.
  24.  
  25.      Other support software for using the PDS CD-ROM disks has also been
  26. developed.  These packages include the USGS Planetary Image Cartography
  27. System (PICS) for MicroVAX computers, a set of FORTRAN routines to access
  28. CD-ROM disks on VAX computers (VMSCD), and "C" language source code to
  29. process disks written in the High Sierra format.  Contact Mike Martin
  30. (JPLPDS::MMARTIN) for access to these tools.
  31.  
  32.  
  33.                                  Chapter 2
  34.  
  35.                                  BACKGROUND
  36.  
  37.  
  38.      Efforts to utilize small computer systems for display and analysis of
  39. scientific data have been hampered by the lack of sufficient data storage
  40. capacity to accommodate large image arrays.  Most planetary images require
  41. nearly a megabyte of storage.  Over the past two years a new storage
  42. technology, "CD-ROM", has been developed which provides the capability to
  43. store up to 600 megabytes of data on a single 4.72-inch disk.  The disks
  44. can be mass produced, and hundreds of copies of large digital archives
  45. distributed rather than the few sets currently produced.  Readers for
  46. CD-ROM disks can now be purchased for under a thousand dollars for use on
  47. personal computers and some science workstations.
  48.  
  49.    The PDS has worked with industry and other government agencies to
  50. support the development of CD-ROM as a major data distribution and storage
  51. media for space science data.  Initial development efforts by the PDS, the
  52. Voyager Project, and multi-disciplinary science representatives have
  53. resulted in the production of 5 CD-ROM disks, two samplers, and 3 disks
  54. containing all 6,538 images from the Voyager Uranus encounter.  The IMDISP
  55. program can be used to display most of these data files on a personal
  56. computer equipped with a CD-ROM drive.
  57.  
  58.  
  59. 2.1 DIGITAL IMAGE PROCESSING SUMMARY
  60.  
  61.  
  62.    A digital image is a picture converted to numerical form so that it can
  63. be stored and used in a computer.  The image is divided into a matrix of
  64. small regions called picture elements, or pixels.  The rows and columns of
  65. pixels are called "lines" and "samples", respectively. Each pixel has a
  66. numerical value, or DN (data number) value, quantifying the darkness or
  67. brightness of the image at that spot.  In total, each pixel has an address
  68. (line number, sample number) and a DN value, which is all that the computer
  69. needs for processing.  The DN value of each pixel usually represents a
  70. shade of darkness or brightness between black and white (gray levels).  How
  71. many gray levels there are in an image depends on the number of bits used
  72. to represent each pixel intensity in the computer.  The number of gray
  73. levels will be equal to 2^n, where n is the number of bits per pixel's DN
  74. value.  If 8 bits are used to represent a pixel's DN value (gray level),
  75. the system will be capable of using 2^8, or 256, gray levels in an image,
  76. where DN 0 is pure black, and DN 255 is pure white.  If each DN used only 4
  77. bits of storage, the image would contain only 2^4 or 16 gray levels; if
  78. there were only 1 bit per DN, the image would contain only black and white
  79. pixels (bit values of 0 or 1).
  80.  
  81.  
  82. 2.2 OVERVIEW OF IMDISP CAPABILITIES
  83.  
  84.  
  85.    While the specifics of IMDISP commands are discussed in Chapter 4, this
  86. section provides a general overview of how a user can manipulate images
  87. once a file is selected.  There are DISPLAY commands which allow the user
  88. to display all or part of an image at various positions on the display
  89. screen.  The user may also zoom in and out from a point on the image
  90. defined by the cursor, and may pan around the image.  The cursor may be
  91. turned on or off; when on, the arrow keys are used to move the cursor
  92. around the screen; when off, the cursor is not visible.
  93.  
  94.    A user may choose to "subsample" the image, to enable more or all of the
  95. original image to be displayed on the screen at once.  For example, if the
  96. image were subsampled by a factor of 2, every other pixel from every other
  97. line would be displayed, starting from the upper left corner of the image.
  98. If a factor of 3 were chosen, every third pixel from every third line would
  99. be displayed.  Any positive integer may be used for subsampling.
  100.  
  101.    The user may produce a histogram of an image file, which is a graph
  102. showing the number of pixels per DN value, or per range of DN values, for
  103. the entire image.  Histograms are overlaid on top of the image, but may be
  104. removed using the REFRESH command.  Subsampling may be specified when
  105. computing a histogram to reduce the time required for the calculations.
  106.  
  107.    A profile may be created which plots DN value versus pixel along a line
  108. between two points on the image.  After the cursor is used to select the
  109. two endpoints, the connecting line is drawn on the image and the profile is
  110. plotted at the bottom of the screen.  There is a plot command to plot the
  111. actual data values in an image line.
  112.  
  113.    The user may also "stretch" the image, which is analogous to turning the
  114. contrast knob on a TV set.  The user specifies low and high DN values; all
  115. pixels with values lower than the specified "low" become black, and all
  116. pixels higher than the specified "high" value become white.  All pixels
  117. between the low and high values are evenly shaded between black and white.
  118.  
  119.    There are bookkeeping types of commands, also.  These allow the user to
  120. do such things as retrieve a desired image from the CD-ROM, to save an
  121. image to a file on hard disk, and to erase only the graphics from the
  122. screen or to erase the entire screen.  Users may execute batch command
  123. files to do a series of tasks automatically.  Lastly, the user may, of
  124. course, EXIT the IMDISP program when done.
  125.  
  126.  
  127. 2.3 GRAY LEVEL AND FALSE COLOR IMAGES
  128.  
  129.  
  130.    Most planetary images are composed of 8-bit DN values representing
  131. monochrome brightness levels in the scene.  To obtain color images,
  132. separate images are taken through color filters (red, green, blue) and are
  133. then combined by ground processing systems to produce a true color image.
  134. Only a very small fraction of planetary images are available in color
  135. versions.  Most display and analysis is done on monochrome images.
  136.  
  137.    A display with 256 (2^8) gray levels is required to present the
  138. information contained in a standard image.  However, the human eye can only
  139. distinguish about 32 gray levels.  Thus 5-bit DN values would satisfy most
  140. display requirements.  Unfortunately, computers are oriented to the storage
  141. of and manipulation of items which are a power of two, and 5-bit pixels
  142. would be very clumsy.  The standard display devices which the IMDISP
  143. program supports are limited to 16 gray levels (PGA and VGA), 4 gray levels
  144. (EGA) or 2 gray levels (CGA), but the program also supports several
  145. "enhanced" VGA display devices offering up to 256 colors (or 64 shades of
  146. gray).  The 16 gray levels of the PGA are adequate to support image
  147. analysis; however 4 or 2 gray levels are practically useless for viewing
  148. planetary images.  Fortunately the EGA display will support 16 different
  149. colors, and a color palette can be selected which uses a graduated scale of
  150. colors to represent gray levels, producing a "false color" image (false
  151. because the displayed color does not represent the actual color of the
  152. scene).
  153.  
  154.    A false color image (also called a pseudo color image) is created from a
  155. black and white image by assigning a color (rather than a gray level) to
  156. each DN value in the image.  For instance, a DN value of 128 could be
  157. reassigned to yellow if the user so desired.  Ranges of DNs (e.g., 100-125)
  158. may also be assigned one color.  Pseudo colors get assigned to DN values in
  159. a pseudo color table, which the display program then uses to determine how
  160. to color the image on the monitor.  Display programs often have preset
  161. pseudo color tables with commonly used DN-color combinations, and the user
  162. can simply call for one of these when generating a pseudo color image.  The
  163. option exists, of course, for users to generate their own pseudo color
  164. tables.  Pseudo colors are often used to highlight features of an unusual
  165. nature in an image.
  166.  
  167.    Since the Enhanced Graphic Adapter for the IBM PC provides only 4 gray
  168. shades (black, dark gray, light gray and white) most image viewing is done
  169. using a pseudo color table which interprets gray levels as color values
  170. ranging from black through reds, greens and blues up to white.
  171.  
  172.  
  173. 2.4 RADIOMETRIC AND GEOMETRIC CORRECTIONS
  174.  
  175.  
  176.    All camera systems have some kind of distortions in the lens, in the way
  177. the shutter works, etc.  Distortions in the amount of fight transferred
  178. through the camera to the imaging plate are called radiometric distortions.
  179. Geometric distortion affects the "squareness" of an image, and is detected
  180. by taking an image of a geometric grid.
  181.  
  182.    For spacecraft cameras, both types of distortion can be measured before
  183. launch, and in a limited fashion, in flight.  These measured distortions
  184. are saved in digital files.  When a raw image is received, these
  185. "calibration files," as they are called, are subtracted from (or otherwise
  186. applied to) the image, effectively removing radiometric and geometric
  187. distortion.  This process is called radiometric and geometric correction.
  188. Corrected images contain the closest possible representation of the scene
  189. being imaged.
  190.  
  191.  
  192. 2.5 IMAGE FILE FORMATS
  193.  
  194.  
  195.    Digital image files are seldom stored as a simple array of pixels.
  196. Generally there is an area at the beginning of an image file containing
  197. descriptive information about the image.  This is referred to as a label or
  198. header area.  Figure 2-1 shows a diagram of a simple image format with a
  199. label area followed by the image lines.  In practice, images from planetary
  200. missions have a more complicated format, due to the need to store
  201. additional information to allow proper interpretation of the image data.
  202. Figure 2-2 shows the format of a Voyager image, which has engineering
  203. parameters embedded at the end of each image line to form a line suffix
  204. area, an engineering trailer record after the last image line, and this is
  205. followed by an image histogram.
  206.  
  207.  
  208.                        ┌────────────────────────┐
  209.                        │ Labels or Header Area  │
  210.                        ├────────────────────────┤
  211.                        │ Image Array Line 1     │
  212.                        ├────────────────────────┤
  213.                        │ Image Array Line 2     │
  214.                        └────────────────────────┘
  215.                                    .
  216.                                    .
  217.                                    .
  218.                        ┌────────────────────────┐
  219.                        │ Image Array Line n     │
  220.                        └────────────────────────┘
  221.  
  222.                     Figure 2-1: Simple Image Format
  223.  
  224.    Different image label formats have been developed for use by nearly all
  225. image processing facilities.  Two formats are widely used within the
  226. planetary and astronomy communities: the VICAR2 (Video Image Communication
  227. and Retrieval) labels used by the Multi-Mission Image Processing Laboratory
  228. (MIPL) and FITS (Flexible Image Transport) labels used for astronomy image
  229. interchange.  The PDS has developed a label scheme which is very similar to
  230. these standards, called the Object Description Language (ODL).  This format
  231. attempts to add a broader range of data descriptive capabilities to the
  232. proven capabilities of the existing label systems.  A description of the
  233. ODL architecture is given in Appendix D.
  234.  
  235.    Most of the images stored on the PDS CD-ROM disks have either ODL or
  236. VICAR2 labels.  IMDISP will automatically interpret these labels to
  237. determine the display format of the image data.
  238.  
  239.                  ┌────────────────────────────────────┐
  240.                  │ PDS ODL Labels                     │
  241.                  ├─────────────────────┬──────────────┤
  242.                  │ Image Array Line 1  │ Line Suffix  │
  243.                  ├─────────────────────┼──────────────┤
  244.                  │ Image Array Line 2  │ Line Suffix  │
  245.                  └─────────────────────┴──────────────┘
  246.                                    .
  247.                                    .
  248.                                    .
  249.                  ┌──────────────────────┬─────────────┐
  250.                  │ Image Array Line 800 │ Line Suffix │
  251.                  ├──────────────────────┴─────────────┤
  252.                  │ Image Engineering Trailer          │
  253.                  ├────────────────────────────────────┤
  254.                  │ Image Histogram                    │
  255.                  └────────────────────────────────────┘
  256.  
  257.                  Figure 2-2: Voyager CD-ROM Image Format
  258.  
  259.  
  260. 2.6 CD-ROM FUNDAMENTALS
  261.  
  262.  
  263.    The CD-ROM disk uses the same basic data storage format as a CD audio
  264. disk.  In fact, data blocks are identified by minute, second and sector
  265. number, following the audio format.  Data blocks are recorded along a
  266. spiral from the inner to the outer radius of the disk.  Each raw data block
  267. (sector) contains 2,352 bytes of information, with 304 bytes used for
  268. housekeeping and error correction and 2,048 (2K) containing user data.
  269. Each data block is called a sector, and 75 sectors are stored per second.
  270. Since the nominal playing time of a CD disk is 60 minutes, the data storage
  271. capacity is 75 sectors per second * 60 seconds per minute * 60 minutes or
  272. 270,000 sectors.  Thus the nominal storage capacity of a single CD-ROM disk
  273. is 540,000 kilobytes, which can be extended to more than 600,000 kilobytes
  274. and beyond by recording more than 60 minutes of data on a disk.
  275.  
  276.    In order to maximize the storage capacity of CD disks a constant linear
  277. velocity (CLV) recording format is used.  This means that the player
  278. changes speed (slows down) as it reads from the inside to the outside of
  279. the disk, to maintain a constant flow of data under the read mechanism at a
  280. speed of 1.2 meters per second.  This is in contrast to most magnetic disk
  281. drives which use constant angular velocity (CAV) storage, where the
  282. information density is greater on the inner tracks that the outer tracks.
  283. While the use of CLV recording increases the storage capacity of CD-ROM
  284. disks, it reduces access time, since the disk must change speeds as it
  285. moves to different positions on the disk radius.  The strategy for locating
  286. a recorded data block is also more complicated than with constant angular
  287. velocity recording technology.
  288.  
  289.    As a result the average access time of CD-ROM drives is between 400 ms
  290. and 1 s, and the maximum data transfer rate to the host computer is 150
  291. kilobytes per second.  These rates are approximately an order of magnitude
  292. slower than magnetic disks.  Therefore, the access mechanisms to disk
  293. directories and data must be customized for CD-ROM in order to provide
  294. acceptable performance.
  295.  
  296.    The development of a standard logical format for recording data files on
  297. CD-ROM disks was taken on by a group of CD-ROM applications developers,
  298. hardware vendors and computer vendors.  The proposed standard resulting
  299. from this initial effort was called the High Sierra format. This format was
  300. submitted to the International Standards Organization (ISO) for
  301. consideration and approved on October 5, 1987. It is now referred to as the
  302. ISO-9660 standard.  The format used for the early PDS CD-ROM disks is dated
  303. May 28, 1986, and differs slightly from the final ISO standard.  Microsoft
  304. and other CD-ROM software developers have committed to supporting this
  305. preliminary version of the format in later software releases.  However,
  306. software developed by other vendors to support the ISO format (DEC for
  307. example) will not support the format of these early disks.
  308.  
  309.  
  310.  
  311.                                Chapter 3
  312.  
  313.                           IMDISP INSTALLATION
  314.  
  315.  
  316.    IMDISP requires an IBM PC, XT, AT or 100 percent compatible with 512K of
  317. base memory.  It supports several graphics display devices, including the
  318. Enhanced Graphics Adapter (EGA), the Video Graphics Array (VGA), the
  319. Professional Graphics Adapter (PGA), and the Color Graphics Adapter (CGA).
  320. The hardware environment in which the program has been developed and tested
  321. includes and AT class computer, deluxe or enhanced EGA board with 256K of
  322. memory, and MultiSync (tm) or multiscan monitor.
  323.  
  324.  
  325. 3.1 PROGRAM SETUP
  326.  
  327.  
  328.    The IMDISP program can be run from a floppy or hard disk.  To use the
  329. program from a floppy disk, insert the program disk in the A: or B: drive
  330. and type the MS-DOS command: "A:" or "B:" to set the floppy disk as the
  331. default drive.  To use the program from hard disk first create a directory
  332. to hold the IMDISP files.  Use the MS-DOS command "MKDIR \IMDISP" to create
  333. a directory to hold the programs.  Use the "CHDIR \IMDISP" command to make
  334. IMDISP the default directory.  Insert the distribution floppy disk in
  335. floppy disk drive A:.  Now type "COPY A:*.*" to copy the files from the
  336. distribution disk to your hard disk.  You should now be able to run all
  337. examples from that directory on your hard disk.  If you wish to use IMDISP
  338. from other directories, you need to include the IMDISP directory in your
  339. MS-DOS "PATH" command.  This command provides MS-DOS with a list of
  340. directories to search when looking for a program file to run.  If you wish
  341. to run IMDISP from different directories, the \IMDISP subdirectory should
  342. be added to the PATH command in your AUTOEXEC.BAT file.  A sample path
  343. command would look like this:
  344.  
  345.                PATH=C:\DOS;C:\UTIL;C:\WORDSTAR;C:\IMDISP
  346.  
  347.    You may want to add a line to your AUTOEXEC.BAT file which will allow
  348. you to abort the display program while running batch files or displaying
  349. large image files.  If the command "BREAK=ON" is placed in CONFIG.SYS, you
  350. will (sometimes) be able to terminate the IMDISP program by typing the
  351. control and break keys simultaneously.  Different computer systems offer
  352. varying response to the control-break command, and the use of this command
  353. may effect other programs you use.
  354.  
  355.    You can set IMDISP to start up in the correct display mode for your
  356. video system by specifying the environment variable IMDISP in your
  357. AUTOEXEC.BAT file.  A sample command to do this would look like this:
  358.  
  359.                             SET IMDISP=ORCHID800
  360.  
  361. If you have an Orchid ProDesigner super VGA board with 512K of video
  362. memory.  See section 3.3 for a description of all the possible supported
  363. video modes.
  364.  
  365.    IMDISP also builds various scratch files for use when browsing images or
  366. executing DOS functions.  By default, they go in the root directory on
  367. drive C:.  If you wish to have them written somewhere else, you may do that
  368. by specifying the desired directory in the environment variable IMBROWSE.
  369. A sample command to do this would look like this:
  370.  
  371.                            SET IMBROWSE=D:\TEMP\
  372.  
  373. This will make IMDISP write its scratch files in the subdirectory TEMP on
  374. drive D:.  Note that the final backslash (\) is required.  We recommend
  375. that the drive specified by IMBROWSE have at least 512K of free space - the
  376. scratch file written when using any of the DOS system calls can be as large
  377. as that.
  378.  
  379.  
  380. 3.2 CD-ROM SETUP
  381.  
  382.  
  383.    To use the IMDISP program with PDS CD-ROM disks you will need a CD-ROM
  384. reader, interface board, and software provided by the vendor which will
  385. make your CD Reader look like a disk drive to your PC.  The details of
  386. setting up your hardware and software configuration are beyond the scope of
  387. this manual, however several aspects of setup will be reviewed.
  388.  
  389.    There are many potential pitfalls in setting up your hardware and
  390. interface board.  Read the directions carefully, and don't assume that
  391. "default" switch settings are correct.  Check all switches to see that they
  392. correspond to the recommended settings.
  393.  
  394.    To work properly with the batch command and label files provided with
  395. IMDISP, your CD-ROM drive should be set up to be drive letter "L:". Most
  396. vendor software allows you to select the drive letter which will be
  397. assigned to the CD-ROM reader.
  398.  
  399.  
  400. 3.2.1 Microsoft Extensions
  401.  
  402.  
  403.    If you are using the Microsoft Extensions you will load a CD-ROM device
  404. driver as part of your CONFIG.SYS file (or two drivers if using the Philips
  405. or DEC readers) with a line like this:
  406.  
  407.    DEVICE=HITACHI.SYS /D:CDROM1 /N:1
  408.  
  409. This command assumes that the driver file "HITACHI.SYS"is located in your
  410. ROOT directory.  The /D:CDROM1 switch assigns a logical name CDROM1 to the
  411. drive.  A name must be supplied, and is used to identify this device, in
  412. case more than one CD-ROM drive is being used on your system. The name
  413. should not be the same as the name of any file stored on your system.  An
  414. attempt to open a file with the same name as the device driver will result
  415. in the device driver being opened, not the file.  The /N:1 switch indicates
  416. that this is drive 1.  This switch is used since some CD-ROM interface
  417. cards support multiple drives.
  418.  
  419.    Other commands which should be included in CONFIG.SYS if you are using a
  420. CD-ROM drive with the Microsoft Extensions are:
  421.  
  422.    LASTDRIVE=Z
  423.    FILES=30
  424.    BUFFERS=50
  425.  
  426.  
  427.    The LASTDRIVE command tells MS-DOS to allow for enough drive letters to
  428. support the CD-ROM drive, plus any other drives on your system. Using
  429. LASTDRIVE=L should also work in most circumstances.  The files and buffers
  430. specifications provide sufficient system work area to support CD-ROM
  431. operations.
  432.  
  433.    You must also execute a program called MSCDEX.EXE which allows access to
  434. the CD-ROM drive as if it were a disk drive on your system.  This command
  435. can be put in your AUTOEXEC.BAT file so that it is automatically run
  436. whenever you start-up your computer.  The command format is:
  437.  
  438.    MSCDEX /D:CDROM1 /L:L /M:20 /V /E
  439.  
  440.    Several MSCDEX command switches are illustrated.  The /L:L command
  441. assigns the drive name L: to the CD-ROM drive.  The /D switch gives the
  442. device name of the CD-ROM drive (which must be the same name used in the
  443. device name parameter of  the "DEVICE=CDROM.SYS" command in the CONFIG.SYS
  444. file.  The /M:20 switch assigns twenty 2K blocks of memory as a buffer for
  445. use with CD-ROM data.  The /V switch provides verbose messages when the
  446. installation program is run, and /E tells the program to use expanded
  447. memory for the cache area.
  448.  
  449.  
  450. 3.2.2 Other Driver Software
  451.  
  452.  
  453.    Some vendors (Reference Technology, TMS) offer CD-ROM software which is
  454. comparable to the Microsoft Extensions.  Our experience with these software
  455. packages is that they modify the internals of MS-DOS and may cause
  456. unpredictable results with your other PC software.  They often do not
  457. support CD-ROM applications designed to work with the MS-DOS extensions for
  458. CD-ROM and cannot be used with the IMDISP FILE prompt mode.
  459.  
  460.  
  461. 3.2.3 Problems with CD-ROM Software
  462.  
  463.  
  464.    The PDS CD-ROM disks utilize a feature of the CD-ROM format standard
  465. which provides extended attribute records to define the physical
  466. characteristics of data files.  These records will be used by VAX and other
  467. minicomputer systems where the operating system allows a variety of record
  468. formats (fixed, variable, stream).  Many of the earlier implementations of
  469. High Sierra software failed to recognize these records, which are placed at
  470. the beginning of a file's data area.  If your CD-ROM software was developed
  471. prior to April 1987, it may interpret these records as part of the data
  472. file, causing the first 2K bytes of each file to appear as meaningless
  473. binary data.  Users with this problem should contact their hardware or
  474. software vendors for updated versions of the CD-ROM software.  The IMDISP
  475. program has been patched to recognize and skip over these records on the
  476. PDS CD-ROM disks, but these patches may not support other CD-ROM disks with
  477. extended attribute records.
  478.  
  479.  
  480. 3.3 DISPLAY DEVICE CHARACTERISTICS
  481.  
  482.  
  483.    IMDISP automatically finds out which display devices are available (PGA,
  484. EGA, or CGA) and uses the one available.  The Enhanced Graphics Adapter
  485. must have at least 128K of memory to work properly.  Use of the Color
  486. Graphics Adapter is discouraged because the pixels have no gray levels,
  487. only black or white.
  488.  
  489.    The display coordinates start at (1,1) in the upper left corner of the
  490. screen; the line direction is down and the sample direction is to the
  491. right.
  492.  
  493.  
  494. 3.3.1 Enhanced Graphics Adapter (EGA)
  495.  
  496.  
  497.    The EGA is a bit-mapped display device providing a resolution of 350
  498. lines by 640 samples of 4-bits each.  It produces a digital video signal
  499. for each primary color (red, green and blue), The video signal for each
  500. color can be set to one of four levels, roughly equivalent to off, low,
  501. medium and high.  Thus the number of possible colors (color palette) is 64
  502. (4^3).  The following table illustrates the colors created by some of the
  503. different combinations of red, green and blue.
  504.  
  505.       Red=   off, Green=   off, Blue=   off  results in Black
  506.       Red=   low, Green=   off, Blue=   off  results in Dark Red
  507.       Red=medium, Green=   off, Blue=   off  results in Light Red
  508.       Red=  high, Green=   off, Blue=   off  results in Bright Red
  509.       Red=   low, Green=   low, Blue=   low  results in Dark Gray
  510.       Red=medium, Green=   low, Blue=   off  results in Brown
  511.       Red=medium, Green=medium, Blue=   off  results in Yellow
  512.       Red=medium, Green=medium, Blue=medium  results in Light Gray
  513.       Red=  high, Green=   low, Blue=   off  results in Orange
  514.       Red=  high, Green=  high, Blue=  high  results in White
  515.  
  516.               Table 3-1: Sample EGA Color Palette Settings
  517.  
  518.  
  519.    The EGA display is limited to only 16 colors out of the 64 possible,
  520. because only 4-bits are used to store each pixel value in memory.  This
  521. 4-bit pixel value points to an entry in the color table which represents
  522. one of the 64 possible combinations of red, green and blue which can be
  523. displayed.
  524.  
  525.    Many of the newer EGA boards are capable of displaying additional lines
  526. and samples when using a MultiSync (tm) or Multiscan monitor.  The standard
  527. EGA uses a 16 Mhz crystal oscillator (something like a clock which
  528. regulates the display speed), which limits the video output rate to the
  529. equivalent of 640 pixels by 350 lines.  The EGA circuitry allows for a
  530. faster crystal oscillator to be added to the board (24 Mhz and beyond)
  531. allowing about 25 percent more lines to be displayed (480 lines instead of
  532. 350).  A method for adding this capability to an existing EGA board (for
  533. about $10 worth of parts) is described in the September 16, 1986 issue of
  534. PC Magazine.
  535.  
  536.    This mode requires that a MultiSync (tm) or multiscan monitor be
  537. attached to the computer, and there is no way for the program to
  538. automatically detect the presence of the special monitor.  Therefore this
  539. display mode is invoked by specifying an MSDOS "ENVIRONMENT" variable.
  540. This is done by issuing an MSDOS "SET" command at the MSDOS prompt as
  541. follows:
  542.  
  543.    SET IMDISP=EGA480
  544.  
  545.    This command can also be put in your AUTOEXEC.BAT file using a text
  546. editor, so that you need not invoke it each time you run IMDISP.  It should
  547. have no effect on other MSDOS system operations.  There is a chance that
  548. adding this variable will exceed the size reserved by MSDOS for environment
  549. variables.  If so, you should consult your MSDOS manual to increase the
  550. environment size on your system.  The environment variable can be removed
  551. with the MSDOS command:
  552.  
  553.    SET IMDISP=
  554.  
  555. where a carriage return is typed immediately after the equal sign. The 480
  556. line mode requires an additional 83K of memory for the refresh buffer.  If
  557. you try this mode and receive the message "Insufficient memory for line
  558. buffer", it is probably because you have a 512K memory machine, or have
  559. memory resident programs operating (like Sidekick or Superkey) which reduce
  560. the available memory to less than about 400K. You will need to use the 350
  561. line mode or remove some memory resident programs to operate in 480 line
  562. mode.
  563.  
  564.    Users of the EGA with MultiSync (tm) and Multiscan monitors can achieve
  565. a 16 gray level display through the use of a special device called the
  566. Grayscaler 1, from Avocado Computer, Box 632, Yorba Linda, Ca, 92686, (714)
  567. 528-1025.  This cable converts the digital video signals produced by the
  568. EGA board to analog signals.  By selecting appropriate EGA palette entries,
  569. a fairly good representation of 16 gray levels can be achieved (use the
  570. palette selection "PAL LOAD GRAY16.PAL" to select this palette).
  571.  
  572.  
  573. 3.3.2 Video Graphics Array (VGA)
  574.  
  575.  
  576.    This version (4.0) of the IMDISP program includes support for the IBM
  577. Video Graphics Array (VGA) display device.  The VGA produces an analog
  578. display with several new color modes.  Of particular interest to IMDISP
  579. users are the 640 x 480 line mode with 16 displayable colors (or gray
  580. levels).  The 320 x 200 line mode with 256 displayable colors (or 64 gray
  581. levels) has been tested but produces very blocky pixels.  This version of
  582. IMDISP supports the 640 x 480 mode.
  583.  
  584.    To set the VGA display mode you must set a MSDOS environment variable
  585. prior to executing IMDISP.
  586.  
  587.    To set the environment variable use the MSDOS command:
  588.  
  589.    SET IMDISP=VGA
  590.  
  591. This will put the display in 640 sample by 480 line mode, with 16 gray
  592. levels or colors displayable from a palette of 256K.  The display is
  593. initialized with a gray scale palette, but a pseudocolor palette can be
  594. invoked with the IMDISP command "PAL PS 0".  The "PALETTE EDIT" command
  595. will allow you to step forward or backward through the 64 available shades
  596. for each primary color.  See the next section of the IMDISP manual for more
  597. information on the palette edit function.
  598.  
  599.  
  600.    Users may experiment with the 320 x 200 VGA mode by using
  601.  
  602.    SET IMDISP=VGA320
  603.  
  604. The pixels are rather large in this mode, but there are enough colors to
  605. display images nicely.
  606.  
  607.  
  608. 3.3.3 Professional Graphics Adapter (PGA)
  609.  
  610.  
  611.    The PGA is a special graphics board developed by IBM for use with
  612. CAD/CAM applications on the IBM PC.  Because its architecture is
  613. incompatible with the CGA and EGA boards, it has not been well received by
  614. software developers.  The PGA provides an analog video signal with a
  615. display resolution of 480 lines by 640 samples of 8-bits each.  It provides
  616. 16 intensities for each primary color, resulting in a palette of 4,096
  617. colors (16^3).  The color table allows 256 colors to be displayed
  618. simultaneously, however only 16 gray levels can be selected.
  619.  
  620.    Use the command:
  621.  
  622.    SET IMDISP=PGA
  623.  
  624. at the MSDOS prompt to force IMDISP to go into PGA display mode.
  625.  
  626.  
  627. 3.3.4 Color Graphics Adapter (CGA)
  628.  
  629.  
  630.    The CGA display is a bit-mapped graphics device with a resolution of 200
  631. lines by 640 samples of 1-bit each.  It supports only 2 colors in this
  632. display mode, black and white.  This display can be used to get a general
  633. idea of the contents of a digital image, or for displaying one bit images
  634. (graphics for example) but is not recommended for use with the PDS CD-ROM
  635. images.
  636.  
  637.    To force a multi-function display card into CGA mode, use:
  638.  
  639.    SET IMDISP=CGA
  640.  
  641. 3.3.5 Super VGA Display Boards
  642.  
  643.  
  644.    Several high resolution display boards are supported by this version of
  645. IMDISP.   Most of them support resolutions with 256 colors or 64 grayscale
  646. levels.  Select one from the following list if it matches your display
  647. board:
  648.  
  649.       SET IMDISP=     Resolution     Board Name
  650.            ATI640      640x480x256    ATI VGA Wonder Board
  651.            ATI800      800x600x256    ATI VGA Wonder Board
  652.            ATI1024     1024x768x16    ATI VGA Wonder Board
  653.            EVGA512     512x480x256    Everex EV-673 Board
  654.            EVGA640     640x400x256    Everex EV-673 Board
  655.            ORCHID      640x480x256    Orchid ProDesigner+ Board
  656.            ORCHID800   800x600x256    Orchid ProDesigner+ Board
  657.            ORCHID1024 1024x768x256    Orchid ProDesigner+ Board
  658.            PARADISE    640x480x256    Paradise VGA Board (400 lines if
  659.                                       the board has 256K of memory)
  660.            TRIDENT     800x600x256    Trident-based SuperVGA boards
  661.  
  662.  
  663.                                  Chapter 4
  664.  
  665.                               IMDISP OPERATION
  666.  
  667.  
  668.    IMDISP can be used to display images up to several thousand lines and
  669. samples with a variety of pixel formats.  These formats include bit (1
  670. bit), nibble (4 bits), byte (8 bits), integer (16 bits) or long integer (32
  671. bits).  Integer pixels may be byte-swapped, which means that the sign and
  672. most significant 7 bits are in the rightmost byte, and the least
  673. significant 8 bits are in the leftmost byte.  This is the convention used
  674. by both the IBM PC and VAX computer hardware families. IBM mainframes and
  675. 68000 series computers (Macintosh and Sun, for example) use un-byte-swapped
  676. integers.
  677.  
  678.    Program interaction with the user is via commands typed in response to
  679. the "COMMAND:" prompt.  Most interaction is performed on the graphic
  680. display screen, and program messages are printed over any image display
  681. currently on the screen.  The REFRESH command can be used to restore an
  682. image after other commands have written text over the display.  The ERASE
  683. command can be used to clear away the clutter left by program status
  684. messages and previously displayed images.  The screen is not automatically
  685. erased after each operation in order that multiple images can be displayed
  686. simultaneously, or so a histogram can be placed on the screen with the
  687. image.
  688.  
  689.    IMDISP is invoked by typing "IMDISP" or "IMDISP filename", where
  690. filename is the name of an image file to be opened for processing at
  691. program start-up.  The filename may include a disk drive and path name
  692. specification.
  693.  
  694.    The program will blank the display screen and display a welcome logo,
  695. then the prompt "COMMAND:" will appear in the lower left portion of the
  696. screen.  If a filename is included in the command invocation, the welcome
  697. message is not displayed and the screen will display the COMMAND: prompt.
  698.  
  699.    Typing "HELP" at the command prompt will provide a list of IMDISP
  700. commands.  The most frequently used commands are "FILE" to open a file for
  701. processing, and "DISPLAY" to display an image once the file has been
  702. opened.
  703.  
  704.  
  705. 4.1 COMMAND SYNTAX
  706.  
  707.  
  708.    The command line syntax is of the form:
  709.  
  710.   COMMAND KEYWORD1 = VALUE1 KEYWORD2=VALUE2 KEYWORD3 VALUE3 ...
  711.  
  712.    The command line may be typed in either upper or lower case.  The
  713. command and the keyword names may be abbreviated to 3 characters in most
  714. cases.  Any number of spaces may be inserted between words, and the keyword
  715. and value may be separated by a space or an equals sign.  Some keywords do
  716. not require a value.  All keywords are optional and have default values.
  717.  
  718.  
  719. 4.2 COMMAND DESCRIPTION
  720.  
  721.  
  722.    Table 4-1 presents a summary of IMDISP commands.  They are separated
  723. into 3 groups, file manipulation commands; display commands and program
  724. control commands.  Only the capitalized letters are required to specify a
  725. command.
  726.  
  727.  
  728. 4.3 OPERATING MODES
  729.  
  730.  
  731.    Several of the commands invoke special program operating modes. These
  732. include the FILE command when issued without a filename argument and the
  733. CURSOR, PROFILE and PALETTE EDIT commands.  The FILE mode displays a list
  734. of files in the current directory on the screen for selection.  It also
  735. contains several subcommands for controlling the display of files on the
  736. menu screen.  In the CURSOR, PROFILE and PALETTE EDIT commands the cursor
  737. keys (arrow keys) on the numeric keypad are used in conjunction with other
  738. keys to control program operation.  These modes are exited by typing either
  739. a period '.' or carriage return.
  740.  
  741. File oriented commands:
  742.  
  743.     CD or CHDIR .  .  .  .  to change the default directory
  744.     DIRECTORY   .  .  .  .  to perform the MSDOS directory command
  745.     FILE        .  .  .  .  to specify the name of the image
  746.     LABEL       .  .  .  .  to display the image labels
  747.     SAVE        .  .  .  .  to save the image display to a file
  748.     TYPE        .  .  .  .  to perform the MSDOS type command
  749.  
  750. Display commands:
  751.  
  752.     BROWSE      .  .  .  .  to display a group of images
  753.     CURSOR      .  .  .  .  to move the cursor around
  754.     DISPLAY     .  .  .  .  to display the image
  755.     ERASE       .  .  .  .  to erase the display
  756.     HISTOGRAM   .  .  .  .  to display the histogram of the image
  757.     NEG         .  .  .  .  to invert the color palette
  758.     OVERLAY     .  .  .  .  to place an overlay on the image
  759.     PALETTE     .  .  .  .  to adjust the palette for the display
  760.     PLOT        .  .  .  .  to plot image lines and spectra on the display
  761.     PROFILE     .  .  .  .  to plot a profile of the image
  762.     REFRESH     .  .  .  .  to refresh the image plane
  763.     SET         .  .  .  .  to set display options
  764.     STRETCH     .  .  .  .  to do a linear gray scale stretch
  765.     TEXT        .  .  .  .  to draw text on the image
  766.  
  767. Program control commands:
  768.  
  769.     BATCH       .  .  .  .  to execute a batch command file
  770.     EXIT or QUIT.  .  .  .  to exit from the program
  771.     HELP        .  .  .  .  Display help information
  772.     MENU        .  .  .  .  to select images from a menu file
  773.     SYSTEM      .  .  .  .  execute an MSDOS command
  774.  
  775.          Table 4-1: IMDISP Command Summary
  776.  
  777.  
  778. 4.4 ERROR HANDLING
  779.  
  780.  
  781.    If an invalid command is issued at the COMMAND: prompt the program will
  782. beep and return to the COMMAND: prompt.  In handling command parameters the
  783. program takes action on those parameters that are recognized, but ignores
  784. invalid parameters.
  785.  
  786.    It is also possible for certain system errors to be encountered which
  787. cause the program to abort leaving your computer in graphics mode.  N you
  788. are using certain utilities which reset the default text mode screen colors
  789. (like the Norton Utilities screen attributes command) you may not be able
  790. to see what is being printed on the screen.  The simplest approach is to
  791. perform a warm boot, by typing the Ctrl, Alt, Del  keys simultaneously.
  792. Alternately, you can often type IMDISP then EXIT to reset the computer to
  793. text mode.  Errors in processing image files on CD-ROM, hard disk or floppy
  794. disks can cause these aborts.
  795.  
  796.  
  797. 4.5 COMMAND REFERENCE
  798.  
  799.  
  800.    This section lists all IMDISP commands alphabetically and describes
  801. their function, parameters which control  command operation, and provides
  802. examples of command use, In the command and parameter description the
  803. following conventions are used:
  804.  
  805.    filename    represents the name of an MSDOS file, and may include an
  806.                optional drive identifier and path specification.
  807.  
  808.    n           represents an integer value.
  809.  
  810.  
  811. 4.5.1 BATCH
  812.  
  813.  
  814.    The BATCH command reads commands from the specified batch command file.
  815. If no file name is specified the current directory is searched for a file
  816. named BATCH.CMD.  The CURSOR, PROFILE and PALETTE EDIT commands should not
  817. be used within batch command files since they require interactive inputs
  818. from the keyboard.
  819.  
  820.    The BATCH command may take the following argument:
  821.  
  822.    filename    filename of batch command file.
  823.  
  824.    A batch file is simply a text file containing a list of commands, with
  825. each command terminated by a carriage return.  If the command file is
  826. created with a word processor, the program should be used in the
  827. non-document mode, to assure that carriage returns are embedded between
  828. command lines.  An example of creating a batch file to display the PDS logo
  829. image follows.
  830.  
  831.    At the MSDOS command level type:
  832.  
  833.    COPY CON TEST.CMD
  834.    FILE LOGO.IMG
  835.    DISP ZOOM 4
  836.    DISP ZOOM 2
  837.    DISP
  838.    DISP SUB 2
  839.    EXIT
  840.  
  841.    Now run IMDISP and type "BATCH TEST.CMD" at the "COMMAND:" prompt. Make
  842. sure the file "LOGO.IMG" is in your current directory.  The PDS logo should
  843. be displayed on the screen in several different sizes.
  844.  
  845.  
  846. 4.5.2 BROWSE
  847.  
  848.  
  849.    The BROWSE command will display all images in a directory one after
  850. another.  An optional directory mask can be supplied to display only
  851. selected files ("BROWSE *.IMG").  The command creates a list of files to be
  852. displayed, then creates and executes a batch command file to display those
  853. images.  After each image is displayed, the filename is displayed at the
  854. top of the image.  A BROWSE session can be interrupted by pressing
  855. control-s, then restarted by pressing control-q TWICE.  A session can be
  856. halted by typing any other key during the display.  It can then be
  857. restarted (from the beginning) with the command "BROWSE C:BATCH.CMD". The
  858. default file name for the batch file created by the BROWSE command is
  859. 'C:BATCH.CMD'.  This name can be changed using the "SET BROWSE fname"
  860. command where fname can consist of a drive letter and filename, which
  861. should be terminated  with the extension ".CMD".  It can also be set from
  862. DOS or in your AUTOEXEC.BAT file by using the environment variable
  863. IMBROWSE.   For example, the DOS command
  864.  
  865.    SET IMBROWSE=D:\TEMP\BROWSE.CMD
  866.  
  867. will make the create the BROWSE command file in the subdirectory TEMP on
  868. drive D:.
  869.  
  870.    The BROWSE command has one argument and several optional keywords.
  871.  
  872.    fname   optional file selection mask (must immediately follow the
  873.            command BROWSE).  May include a drive letter but not a
  874.            subdirectory name.  Examples (*.img, L:*.BRS).
  875.  
  876.    SIZe n   allows the display of multiple images on the screen.  For
  877.             example, on a 640x480 VGA display, six 200x200 images can be
  878.             displayed adjacent to each other.
  879.  
  880.    SUBsample n   used in conjunction with the SIZE command, to scale each
  881.                  image to fit in the SIZE specification.
  882.  
  883.    NOLabel       inhibits writing the file name label at the top of each
  884.                  image as it is displayed.
  885.  
  886.    DNLow DNHigh  sets the DN range for all images (see SET)
  887.  
  888.    PAUse         pauses display when the screen gets full
  889.  
  890.    ALL           searches all subdirectories in addition to the current
  891.                  directory
  892.  
  893.    SELect        interactively selects files as they are being displayed
  894.                  and writes the filenames out to a select file
  895.  
  896.    FILe fname    select files to browse from a file instead of using a mask
  897.  
  898.    As an example, the command "BROWSE *.* SIZE 200 SUBSAMPLE 4" will
  899. display all the files in the current directory, subsampling each by 4 and
  900. displaying them in a 200 x 200 window.  The command "BROWSE *.BRS SIZE 100
  901. SUB 2" when used with the Voyager Uranus browse images (on Volume 3 of the
  902. Uranus CD-ROM collection) will display up to 24 images at a time on the
  903. screen.
  904.  
  905. *** NOTE ***
  906.  
  907.    BROWSE does not distinguish between image and non-image files, and it is
  908. up to the user to provide the appropriate directory mask to select ONLY
  909. images.  If a message "Image does not have proper label" comes up on the
  910. screen during BROWSE, it is probably because a non-image file is in the
  911. directory you are browsing.   You can type carriage returns several times
  912. to get back to the "COMMAND:" prompt, and the browse will continue.
  913.  
  914.    If you are using BROWSE on a computer without a hard disk, you will have
  915. to use the SET BROWSE command to change the default browse file name to a
  916. writable disk drive,  for example: "SET BROWSE A:BROWSE.CMD". If you are
  917. using BROWSE to view files on a CD-ROM disk, be sure to include the drive
  918. letter of a writable disk  drive if you specify a BROWSE file name.  The
  919. BROWSE command file produced by the BROWSE command can be edited with a
  920. text editor to produce your own custom command files.
  921.  
  922.  
  923. 4.5.3 CD or CHDIR
  924.  
  925.  
  926.    The CD or CHDIR command is used just as it is at the MSDOS command level
  927. to change the current default directory.
  928.  
  929.    The  argument  of the CD command is the  path  name specification of the
  930. new default directory.  For example, "CD \IMDISP\IMAGES" would make
  931. \IMDISP\IMAGES the current directory if it exists.  To change the current
  932. default drive use the "SYSTEM" command ("SYSTEM L:"  for example) or the
  933. "FILE" command.  If there is not enough memory available for the system
  934. command to be executed an error message is displayed.
  935.  
  936.  
  937. 4.5.4 CURSOR
  938.  
  939.  
  940.    The CURSOR command is used to select a point in a displayed image for
  941. subsequent display commands.  When first invoked, it places a small cursor
  942. symbol at the center of the screen.  Depending on the current contents of
  943. the screen, the cursor may be hard to see.  Moving it with the arrow keys
  944. on the numeric keypad will help you locate it.
  945.  
  946.    Whenever the cursor is moved, the current line and sample location of
  947. the cursor and the DN value of the pixel at that point is printed in the
  948. lower right portion of the screen.  The cursor will move 16 pixels in the
  949. selected direction unless the movement value is adjusted using the + or
  950. keys.
  951.  
  952.                           Numeric Keypad Keys
  953.                     ┌──────┬──────┬───────┬───────┐
  954.                     │  7   │  8   │  9    │ PrtSc │
  955.                     │ Home │ Up   │ PgUp  │       │
  956.                     ├──────┼──────┼───────┼───────┤
  957.                     │  4   │  5   │  6    │  -    │
  958.                     │ Left │      │ Right │       │
  959.                     ├──────┼──────┼───────┼───────┤
  960.                     │  1   │  2   │  3    │  +    │
  961.                     │ End  │ Down │ PgDn  │       │
  962.                     └──────┴──────┴───────┴───────┘
  963.  
  964.                          Action of Keypad Keys:
  965.  
  966.                   7 = Move up and left.
  967.                   8 = Move up.
  968.                   9 = Move up and right.
  969.                   4 = Move left.
  970.                   5 = Not active.
  971.                   6 = Move right.
  972.                   1 = Move down and left.
  973.                   2 = Move down.
  974.                   3 = Move down and right.
  975.                   - = Decrement cursor movement value.
  976.                   + = Increment cursor movement value.
  977.  
  978.  
  979.                      Table 4-2: IMDISP Cursor Keys
  980.  
  981.    Cursor mode is exited by typing a "." (period) or carriage return. The
  982. cursor position is retained for future use in DISPLAY commands which use
  983. the CENTER option.  It is very useful with large images where the entire
  984. image may be displayed using the subsample option, then a point selected
  985. for subsequent display at full resolution.
  986.  
  987.    Example: Type "FILE MONTAGE.IMG" followed by "DISP" to display the
  988. MONTAGE.IMG file.  Type "CUR" to enter the cursor mode, then move the
  989. cursor to the center of the Uranus image in the upper left corner of the
  990. image using the up and left arrow keys.  Now type "." to exit cursor mode,
  991. then type "DISP ZOOM 4 CENTER" which will display Uranus as a large grainy
  992. ball on the screen.
  993.  
  994.  
  995. 4.5.5 DIR
  996.  
  997.  
  998.    The DIR command is used just as the MSDOS dir command.  Its argument is
  999. passed to MSDOS for execution.  At the end of the directory listing the
  1000. screen will display "Type carriage return to continue:" which will return
  1001. to the IMDISP command mode.  If there is not enough memory available for
  1002. the system command to be executed an error message is displayed.
  1003.  
  1004.  
  1005. 4.5.6 DISPLAY
  1006.  
  1007.  
  1008.    The DISPLAY command reads an image file and displays it on the the
  1009. screen.  If the image is larger than the display screen, the default mode
  1010. is to display as much of the upper left portion of the image as will fit on
  1011. the screen.  The SUBSAMPLE keyword can be used to select every 'n' lines
  1012. and samples so that representations of very large images may be displayed.
  1013. The ZOOM keyword can be used to enlarge a portion of an image on the
  1014. display screen.  Keywords can be specified to begin displaying at any line
  1015. and sample in the image with the SL (starting line) and SS (starting
  1016. sample).  If only a limited number of lines and samples are to be displayed
  1017. the NL (number of lines) and NS (number of samples) keywords can be used.
  1018. The UP, DOWN, LEFT and RIGHT keywords can be used to display different
  1019. portions of the image, relative to the currently displayed portion.  The
  1020. display can also placed at any point on the screen using the DSL (display
  1021. starting line) and DSS (display starting sample) keywords.  The FLIP
  1022. keyword displays the image from the bottom of the screen to the top, rather
  1023. than the other way around.
  1024.  
  1025.    DISPLAY takes the following keywords :
  1026.  
  1027.    SUBsample n  a positive integral subsampling factor for displaying
  1028.                 images larger than the size of the screen.  SUB=2 would
  1029.                 display an image at half the resolution.
  1030.  
  1031.    If the image lines and samples look like this:
  1032.  
  1033.                  sample values
  1034.  
  1035.         line 1      1 2 3 4 5
  1036.         line 2      6 7 8 9 10
  1037.         line 3      11 12 13 14 15
  1038.  
  1039.    Then the command DISP SUB 2 would produce:
  1040.  
  1041.                  sample values
  1042.  
  1043.         line 1      1 3 5
  1044.         line 2      11 13 15
  1045.  
  1046.    ZOOM n    a positive integral zoom factor for looking at part of an
  1047.              image close up.  The zoom command replicates pixels by the
  1048.              integer value specified.  If the image lines and samples look
  1049.              like this:
  1050.  
  1051.                  sample values
  1052.  
  1053.         line 1      1 2 3
  1054.         line 2      4 5 6
  1055.         line 3      7 8 9
  1056.  
  1057.    Then the command ZOOM 2 would produce the following:
  1058.  
  1059.                  sample values
  1060.  
  1061.         line 1      1 1 2 2 3 3
  1062.         line 2      1 1 2 2 3 3
  1063.         line 3      4 4 5 5 6 6
  1064.         line 4      4 4 5 5 6 6
  1065.         line 5      7 7 8 8 9 9
  1066.         line 6      7 7 8 8 9 9
  1067.  
  1068.  
  1069.    CENTER   center the display around current cursor position.   This
  1070.             command is very useful when displaying large images or when
  1071.             zooming in on selected areas.
  1072.  
  1073.    NL n    number of lines or samples from the image file
  1074.    NS n    to display
  1075.  
  1076.    SL n    starting line or sample within the image file
  1077.    SS n    to display
  1078.  
  1079.    UP n
  1080.    DOWN n   adjusts the starting line up or down from the previous value,
  1081.             thereby moving  the display window up or down in the image.
  1082.             The default amount to move up or down is the size of the
  1083.             display.
  1084.  
  1085.    LEFT n
  1086.    RIGHT n  adjusts the starting sample left or right from the previous
  1087.             value, thereby moving the display window left or right in the
  1088.             image
  1089.  
  1090.    DSL n
  1091.    DSS n   start the image display at the specified line and sample on the
  1092.            display screen.
  1093.  
  1094.    FLIP    flips the image top to bottom, so the image is displayed from
  1095.            the bottom of the screen to the top.
  1096.  
  1097.    Examples: The user wants to display an entire Voyager image (800 x 800)
  1098. on the display screen then display a portion of the image at full
  1099. resolution.  Type "FILE MIRANDA1.LBL", then "DISP SUB 2" to display the
  1100. entire image at half resolution, Use the CURSOR command to move the cursor
  1101. to the center of an area of interest.  Exit the cursor mode by typing ".",
  1102. then type "DISP CENT" to display the selected portion of the image at full
  1103. resolution.
  1104.  
  1105.    The user wishes to place 2 images which are each 800 lines by 800
  1106. samples on the screen next to each other.  The first file is opened with
  1107. "FILE IMAGE1.IMG".  The "DISPLAY SUB 4" command is given to display every
  1108. 4th line and sample of the image to create a 200 x 200 display. Next the
  1109. "FILE IMAGE2.IMG" command is given.  Now a "DISPLAY SUB 4 DSS 201" is given
  1110. to place the second image on the screen starting at display sample position
  1111. 201, next to the first image.
  1112.  
  1113.  
  1114. 4.5.7 ERASE
  1115.  
  1116.  
  1117.    The command ERASE causes the screen to be erased by setting all of the
  1118. pixels to 0, which may not necessarily be black depending on the palette
  1119. setting.
  1120.  
  1121.  
  1122. 4.5.8 EXIT
  1123.  
  1124.  
  1125.    The EXIT command exits IMDISP and returns the user to the MS-DOS
  1126. operating system.  The contents of the image display and refresh buffer are
  1127. discarded.
  1128.  
  1129.  
  1130. 4.5.9 FILE
  1131.  
  1132.  
  1133.    FILE does not take a keyword, just a value which is the file name. The
  1134. specified file will be opened, or an error message issued if the file
  1135. cannot be opened.  The capability to directly address any sector on the
  1136. CD-ROM disk by providing its physical address (minute, second and sector
  1137. number) is also available to users of the Microsoft Extensions software.
  1138.  
  1139.    If the FILE command is specified without a filename, or with a filename
  1140. mask which contains a wildcard, the program will display a list of file
  1141. names in the current directory.  Each file name is preceded by a number.
  1142. Typing the number associated with a file name will select that file for
  1143. processing.  File names that actually represent lower level directories are
  1144. indicated with a <d> symbol after the name, Directories can be traversed
  1145. downward by selecting the number associated with a directory name.  Upward
  1146. traversal is by selecting the item identified as PARENT DIR.  This will
  1147. move upward in the directory hierarchy.
  1148.  
  1149.    The prompt mode clears the screen and displays a menu of files (matching
  1150. the wildcard mask, if one was used) and commands.  These commands allows
  1151. specification of the default drive, a file "mask" to use in selecting file
  1152. names for display and options for moving through the list of files when the
  1153. current directory contain more than 30 files. The top line of the display
  1154. also indicates how many files are in the current directory.  After exiting
  1155. the FILE prompt mode, the previous contents of the display screen can be
  1156. recovered by typing "REFRESH".
  1157.  
  1158.    The FILE prompt mode subcommands:
  1159.  
  1160.      D    select default disk drive
  1161.      M    specify a file selection mask to use in displaying files on the
  1162.           screen.
  1163.      N    display the next set of file names on the screen if there are
  1164.           more files in the current directory than can be displayed on one
  1165.           screen.
  1166.      P    display the previous set of file names.
  1167.      Q    quit the file selection mode and return to IMDISP command mode.
  1168.  
  1169.    The N, P and Q commands are executed immediately.  If the D or M
  1170. commands are selected, the user is prompted to enter a drive letter or file
  1171. mask.
  1172.  
  1173.    If the file selected by the "FILE filename" or FILE prompt mode has a
  1174. valid label, either PDS or VICAR2, then the number of lines and samples and
  1175. the pixel size will be displayed.  If the file is unlabeled then the
  1176. program will prompt for the values to use for the number of lines and
  1177. samples, the number of bits per pixel, and the number of header bytes. PDS
  1178. detached labeled images can also be displayed.  The specified file remains
  1179. the current file until a new FILE command is given.  The FILE command
  1180. resets the SET DNLO and SET DNHI values to the minimum and maximum for the
  1181. pixel size (normally 0 and 255).  If a specified filename is not found in
  1182. the current directory then an error message is displayed.
  1183.  
  1184.    If the unlabeled image has a regular format, that is a uniform structure
  1185. of repeating lines and samples, the user can specify this information when
  1186. prompted by the program.  For example, an image named ASTERIA.DAT with one
  1187. 1422 byte header block followed by an image composed of 370 lines by 450
  1188. samples of 8 bit pixels would be processed as follows:
  1189.  
  1190.    At the COMMAND: prompt type "FILE ASTERIA.DAT".  The program will
  1191. display the message:
  1192.  
  1193.   Input file does not have a proper label.
  1194.   Input number of lines: 370           enter the value 370
  1195.   Input number of samples: 450         enter the value 450
  1196.   Input size of each sample: 8         enter the value 8
  1197.   Input size of header label: 1422     enter 1422 for the size of the
  1198.                                        foreign label block).
  1199.  
  1200.    The physical address of a data block on the CD-ROM can also be specified
  1201. using the syntax 'FILE "CD:mm:ss:bb"', where mm is the minute, ss the
  1202. second, and bb the sector block number of the beginning of the desired data
  1203. area.  The CD:mm:ss:nn must be in double quotes and the CD must be
  1204. capitalized! This mechanism can be used to access files on non-High Sierra
  1205. format disks.  This will only work on systems using the Microsoft
  1206. Extensions software.
  1207.  
  1208.  
  1209. 4.5.10 HELP
  1210.  
  1211.  
  1212.    HELP displays the online help message.  If followed by the name of a
  1213. valid command the message for that command is displayed.  HELP is not
  1214. provided for MSDOS commands (DIR, CHDIR, CD and TYPE).
  1215.  
  1216.  
  1217. 4.5.11 HISTOGRAM
  1218.  
  1219.  
  1220.    The HISTOGRAM command produces a plot showing the number of pixel values
  1221. in the image at each DN level.  The range of DN values is displayed on the
  1222. x-axis and the number of occurrences of a specific DN value on the y-axis
  1223. (See Figure 4-1).
  1224.  
  1225.    The HISTOGRAM command reads through the image, calculates the histogram,
  1226. and then displays the plot on the screen.  The histogram is scaled so that
  1227. the third highest histogram value is used as the maximum. It is recommended
  1228. that the SUBSAMPLE or other subsetting keywords be used to speed up
  1229. histogram calculation, which can be quite slow for large images and for
  1230. images stored on CD-ROM.  Histogram plots are displayed on top of any image
  1231. currently displayed on the screen, so the user may wish to use the ERASE
  1232. command to clear the screen prior to using HISTO.  After the histogram is
  1233. displayed, the image can be restored using the REFRESH command.
  1234.  
  1235.  
  1236.             27582 |      .
  1237.                   |      ..
  1238.                   |     ....
  1239.            COUNT  |     .....
  1240.                   |    .......
  1241.                   |    .........
  1242.                   |   ............
  1243.                   |  ...............
  1244.                    --+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1245.                    0   64   128   192   256
  1246.                             DN value
  1247.  
  1248.                    Figure 4-1: Sample Image Histogram
  1249.  
  1250.  
  1251.    By evaluating the histogram, the user can determine the optimum settings
  1252. for the SET (DNLO and DNHI) command to produce a useful display.  In the
  1253. example above, the image data are clustered between DN values 32 and 144.
  1254. Using the default settings of the EGA display mode the colors assigned to
  1255. the 2 lowest color values and the 7 highest values (representing DN values
  1256. from 0 to 31 and from 144 to 255) would not be used since the image
  1257. contains no pixels with these values.
  1258.  
  1259.    By using the "SET DNLO 32 DNHI 144" command the 16 display levels
  1260. available on the EGA display would be assigned to values between 32 and 144
  1261. rather than distributed evenly from 0 to 255, and all 16 colors would be
  1262. used in the display.
  1263.  
  1264.    HISTOGRAM takes the following keywords and arguments:
  1265.  
  1266.     SUBBSAMPLE n  a integral subsample factor.  For speeding up HISTOGRAM,
  1267.                   use of "SUBSAMPLE 4" is recommended
  1268.  
  1269.     NL n
  1270.     NS n      number of lines and samples from image
  1271.  
  1272.     SL n
  1273.     SS n      starting line and sample in image
  1274.  
  1275.     CENT      perform  the  histogram on  only  the displayed portion of
  1276.               the image.
  1277.  
  1278.    Two special keywords can be used with Voyager or Viking images on the
  1279. PDS CD-ROM disks.  These will extract histogram values stored with the
  1280. image on the CD-ROM disk and reduce the time required for the histogram to
  1281. be generated from more than 1 minute to about 3 seconds.  Note that these
  1282. commands will not work with Voyager image files in the
  1283. \PLANET\JUPITER\ATMOS directory, or with versions of system software
  1284. written before April 1987.
  1285.  
  1286.     VOY   use histogram from Voyager CD-ROM engineering data
  1287.     VIK   use histogram from Viking CD-ROM engineering data
  1288.  
  1289.  
  1290. 4.5.12 LABEL
  1291.  
  1292.  
  1293.    The LABEL command prints the labels for the currently selected image
  1294. file on the screen.   It pauses after each screen full of data, and waits
  1295. for you to press a key before displaying the next screen of data. You can
  1296. terminate the listing by pressing the letter 'Q' to quit and return to
  1297. IMDISP.
  1298.  
  1299.  
  1300. 4.5.13 MENU
  1301.  
  1302.  
  1303.    The MENU command reads a file containing a list of file names and places
  1304. the user in the MENU mode, where files from this list can be selected for
  1305. display.  The MENU mode is similar to the FILE mode, except that the list
  1306. of files presented is that provided in the menu file, rather than from a
  1307. selected directory.
  1308.  
  1309.    The MENU mode can be invoked by typing "MENU filename.MNU" at the
  1310. COMMAND: prompt.  It can also be invoked on program startup by typing
  1311. "IMDISP filename.MNU" to initiate the program.  The menu file must use the
  1312. ".MNU" extension to startup IMDISP in MENU mode.
  1313.  
  1314.    Subcommands of the MENU mode are as follows:
  1315.  
  1316.    #         - Enter the number corresponding to a desired
  1317.                file name to select the file.
  1318.  
  1319.    P)revious - display the previous screen of file names
  1320.    N)ext     - display the next screen of file names
  1321.    Q)uit     - quit or exit from MENU mode
  1322.  
  1323.    After selecting and displaying an image, the user can return to the
  1324. current menu by typing "MENU" at the COMMAND: prompt.
  1325.  
  1326.    A menu file can take either of two formats.   The preferred format is a
  1327. PDS labelled table file containing file names.  A sample file is shown
  1328. below:
  1329.  
  1330. NJPL1I00PDS100000000      = SFDU_LABEL
  1331. FILE_TYPE                 = TABLE
  1332. RECORD_FORMAT             = STREAM
  1333. OBJECT                    = FILE_NAME
  1334.  TYPE                     = LITERAL
  1335.  LENGTH                   = 80
  1336. ENDOBJECT
  1337. NOTE                      = "Sample MENU file for IMDISP"
  1338. END
  1339. L:\OCEAN\SCBMEAN.IMG
  1340. L:\OCEAN\WCMEAN.IMG
  1341. L:\PLDS\TMCH01.DAT
  1342. L:\PLDS\DEM.DAT
  1343. L:\PLANET\SATURN\ATMOS\C3497355.IMG
  1344. <END OF FILE>
  1345.  
  1346.    A second abbreviated form may also be used, where only the filenames are
  1347. specified in the ".MNU" file.  In this case the file would only contain the
  1348. filenames shown after the END statement in the example above.
  1349.  
  1350.  
  1351. 4.5.14 OVERLAY
  1352.  
  1353.  
  1354.    The OVERLAY command draws a lat/lon overlay grid on the displayed image.
  1355. It is intended only for use with the Ocean Data System, West Coast Time
  1356. Series CD-ROM in this program version.
  1357.  
  1358.    The OVERLAY command has the following arguments:
  1359.  
  1360.    MAXLAT   Latitude of top of image.
  1361.    MINLAT   Latitude of bottom of image.
  1362.    MAXLON   Longitude of left side of image.
  1363.    MINLON   Longitude of right side of image.
  1364.  
  1365.    LEGend   Draw a color scale with the overlay.
  1366.  
  1367.  
  1368. 4.5.15 PALETTE
  1369.  
  1370.  
  1371.    The PALETTE command is used for changing the colors assigned to
  1372. displayable color values.  This is done by modifying an internal color
  1373. table which assigns intensity values for red, green and blue to a color
  1374. value, The EGA provides 4 intensity values for each of 3 colors, so that 64
  1375. different colors can be created.  However, the EGA pixels are only 4-bits
  1376. each so only 16 color values can be used simultaneously.
  1377.  
  1378.    The palette can be modified using the EDIT command and saved and loaded
  1379. from a disk file.  The edit mode is invoked by typing PALETTE EDIT.  With
  1380. the EGA display, a bar containing 16 colors or shades will be displayed on
  1381. the bottom of the screen.  A small square will appear in the middle of the
  1382. center color box.  This indicates that this color value is currently
  1383. selected for editing.  To select another color value for editing, move the
  1384. small square to the appropriate color using the "4" (left arrow) and "6"
  1385. (right arrow) keys on the numeric keypad.  The "7" (Home) and "1" (End)
  1386. keys move to the beginning and end of the palette. Pressing the "Ctrl" key
  1387. with either the "4" or "6" keys will jump the small square left or right by
  1388. 8 color bars.
  1389.  
  1390.    The color of the current color box is changed with the "R", "G", and "B"
  1391. keys (for red, green, and blue).  Upper case letters increase the amount of
  1392. the primary color, and lower case keys decrease the amount of the color.
  1393. The "8" (up arrow) and "2" (down arrow) keys increase and decrease,
  1394. respectively, the amount of red, green, and blue simultaneously.  Other
  1395. commands in the palette edit mode are the "S" and "s" commands, which will
  1396. shift all colors one value to the right or left, and the "x" command, which
  1397. will exchange color values (the color setting for color 0 becomes the
  1398. setting for color 15, while 15 replaces 0, the color setting for color 1
  1399. becomes the setting for 14, while 14 replaces 1, etc.).  The up and down
  1400. arrow keys can also be used to cycle through the colors available in a
  1401. given display mode one at a time. Type the "." key or carriage return to
  1402. exit the edit mode.
  1403.  
  1404.    PALETTE takes the following keywords and arguments:
  1405.  
  1406.     EDIT n    to interactively adjust an n-color palette.  See edit
  1407.               description (above) for details
  1408.  
  1409.     PSEUDOCOLOR n  PS = 0 for default EGA palette,
  1410.                    PS = 1 for gray scale palette,
  1411.                    PS = 2 or 3 for pseudo color palettes (16 levels)
  1412.                    PS = 4, ..., 9 for pseudo color palettes (256 levels)
  1413.  
  1414.     SAVE filename  saves the specified palette on disk
  1415.     LOAD filename  loads the specified palette from disk
  1416.     DIS            displays the current palette on the screen
  1417.     ERA            erases the current palette from the screen
  1418.  
  1419.    The default palette file for LOAD or SAVE operations is IMDISP.PAL. The
  1420. format of the default color palette when stored in a palette file is as
  1421. shown below:
  1422.  
  1423. NJPL1I00PDS000000784     = PDS_SFDU_LABEL
  1424. FILE_TYPE                = TABLE
  1425. RECORD_TYPE              = STREAM
  1426. FILE_RECORDS             = 28
  1427. TABLE_ROWS               = 16
  1428. ROW_COLUMNS              =  4
  1429. COLUMN_NAME              = (COLOR_NUMBER,
  1430.                             RED_VALUE,
  1431.                             GREEN_VALUE,
  1432.                             BLUE_VALUE)
  1433. COLUMN_TYPE              = (INTEGER,INTEGER,INTEGER,INTEGER)
  1434. END
  1435.   0   0   0   0
  1436.   1  64   0   0
  1437.   2 128   0   0
  1438.   3 192   0   0
  1439.   4 192  64   0
  1440.   5 192 128   0
  1441.   6 192 192   0
  1442.   7 128 192   0
  1443.   8   0 192   0
  1444.   9   0 192 128
  1445.  10   0 128 128
  1446.  11   0 128 192
  1447.  12   0   0 192
  1448.  13 128   0 192
  1449.  14 192   0 192
  1450.  15 192 192 192
  1451.  
  1452.    The first column of the palette table is the color value number for the
  1453. display, and columns 2, 3 and 4 represent the intensity of the red, green
  1454. and blue (respectively) primary colors on a scale of 0 to 255. With the EGA
  1455. display these values are: 0 = off; 64 = low; 128 = medium; 192 = high.
  1456.  
  1457.  
  1458. 4.5.16 PROFILE
  1459.  
  1460.  
  1461.    PROFILE plots the DN values of pixels located along a line between two
  1462. points in the image, i.e.  it creates a graph of DN value versus pixel
  1463. along the line joining the two points, Cursor mode is used to select the
  1464. two endpoints; typing "." or carriage return selects the current cursor
  1465. position as the endpoint.  After the endpoints are selected a line is drawn
  1466. between the points and the graph is plotted at the bottom of the screen,
  1467. showing the DN values on the x-axis and the positions along the line on the
  1468. y- axis.
  1469.  
  1470.  
  1471. 4.5.17 QUIT
  1472.  
  1473.  
  1474.    Exits the program.  The contents of the image display and refresh buffer
  1475. are discarded.
  1476.  
  1477.  
  1478. 4.5.18 REFRESH
  1479.  
  1480.  
  1481.    REFRESH redisplays the image plane from the refresh buffer.  When images
  1482. are written to the screen they are also written to the refresh buffer.  The
  1483. REFRESH command writes this buffer back to the screen, thereby erasing any
  1484. graphics or text overlaying the image on the screen. The refresh buffer
  1485. contains as many lines from the display screen as there is room for in
  1486. memory.  REFRESH takes no parameters.  It can also be used after the FILE
  1487. prompt mode to redisplay the contents of the refresh buffer.
  1488.  
  1489.    REFRESH is commonly used after the HELP command, or after a HISTOGRAM or
  1490. PROFILE command to remove text and plots from the display screen.
  1491.  
  1492.    Note that the refresh buffer is not large enough to hold an entire Super
  1493. VGA screen.  If you are using one of the high resolution display boards,
  1494. the REFRESH command will only redisplay part of the image.
  1495.  
  1496.  
  1497. 4.5.19 SAVE
  1498.  
  1499.  
  1500.    The SAVE command copies the contents of the display screen to a file. On
  1501. EGA systems the display buffer contains only 4-bits per pixel, so
  1502. specifying BP = 8 will write the 4-bit pixels in full bytes, but does not
  1503. save full 8-bit pixels even if the input image is an 8-bit image. Use the
  1504. COPIM utility program to produce a full resolution subset of an 8-bit image
  1505. in that case.  An 8-bit display device can save an image with full 8-bit
  1506. pixels.
  1507.  
  1508.    SAVE takes the following arguments and keywords, where the filename must
  1509. immediately follow the SAVE command:
  1510.  
  1511.     filename    filename of image to save
  1512.  
  1513.     NL n
  1514.     NS n      number of lines and samples to save
  1515.  
  1516.     SL n
  1517.     SS n      starting line and sample to save
  1518.     BP n      number of bits per pixel in output image
  1519.  
  1520.    Example: Save a 200 line by 200 sample area at the center of an image in
  1521. the file SMALL.IMG.  First use the FILE command to select and display an
  1522. input image.  Now type:
  1523.  
  1524.    "SAVE SMALL.IMG SL 100 SS 210 NL 200 NS 200"
  1525.  
  1526. to save the portion of the image beginning at line 100 and sample 210 in
  1527. the new file SMALL.IMG.
  1528.  
  1529.  
  1530. 4.5.20 SET
  1531.  
  1532.  
  1533.    SET is used set various display options.  It may be used to display and
  1534. change the DN (pixel value) range that is used to compress the pixel values
  1535. to the range appropriate for the display device.  The default, which is
  1536. reset for each new file, is the full range of DN values for the particular
  1537. pixel format (e.g.  0 to 255 for byte).
  1538.  
  1539.    The results of a SET DNLOW or SET DNHIGH command will not take effect
  1540. until the next DISPLAY command is performed.
  1541.  
  1542.    SET can also be used to specify a file name to be used by the browse
  1543. command, change the default display resolution or change the number of
  1544. samples used to display the current image.
  1545.  
  1546.    Set takes the following keywords:
  1547.  
  1548.     DNLOW n
  1549.     DNHIGH n  where values less than DNlow are set to color value 0, values
  1550.               greater than DNHIGH are set to the maximum color value
  1551.               available, and the color values between are assigned equally
  1552.               to the DN values between Dnlow and DNhi.
  1553.  
  1554.     BROwse filename
  1555.               sets a file name to be used for the browse file.   This file
  1556.               name will override  the default file name, which is
  1557.               'c:browse.cmd'.
  1558.  
  1559.     NS n      sets the number of samples to be used for the next DISPLAY
  1560.               command.
  1561.  
  1562.     DISPLAY name
  1563.               sets the current display device.   You might use this to
  1564.               change from Super VGA resolution to VGA if you wish to have
  1565.               bigger pixels for displaying images with the BROWSE command,
  1566.               for example.  To do this, you would type the command SET DIS
  1567.               VGA.  The change will take place immediately.   The current
  1568.               values for DISPLAY are
  1569.  
  1570.               CGA         (640x200x2)
  1571.               EGA         (640x350x16)
  1572.               EGA480      (640x480x16)
  1573.               VGA320      (320x200x256)
  1574.               VGA         (640x480x16)
  1575.               ATI640      (640x480x256) - ATI VGA Wonder Board
  1576.               ATI800      (800x600x256) - ATI VGA Wonder Board
  1577.               ATI1024     (1024x768x16) - ATI VGA Wonder Board
  1578.               EVGA512     (512x480x256) - Everex EV-673 Board
  1579.               EVGA640     (640x400x256) - Everex EV-673 Board
  1580.               ORCHID      (640x480x256) - Orchid ProDesigner+ Board
  1581.               ORCHID800   (800x600x256) - Orchid ProDesigner+ Board (512K)
  1582.               ORCHID1024 (1024x768x256) - Orchid ProDesigner+ Board (1M)
  1583.               PARADISE    (640x480x256) - Paradise SuperVGA Board (512K)
  1584.                           (640x400x256) - Paradise SuperVGA Board (256K)
  1585.               TRIDENT     (800x600x256) - Trident-based SuperVGA boards
  1586.               PGA         (640x480x256) - PGA Board
  1587.  
  1588.    For example, using the default color palette and an EGA display with 16
  1589. color values available, the command "SET DNLO 100 DNHI 164" will assign DN
  1590. values below 100 to black and DN values above 164 to white, and spread the
  1591. 16 color values between the DN limits, thus each color value will represent
  1592. 4 DNs (value 0 = DN 100 to 103; value 1 - DN 104 to 107, etc.).
  1593.  
  1594.    If values other than the default are used then the images will display
  1595. more slowly because scaling divisions are required.  SET with no parameters
  1596. will display the current values.
  1597.  
  1598.    The DNLO and DNHI values are reset to the minimum and maximum for a
  1599. given pixel size when a FILE command is issued.
  1600.  
  1601.  
  1602.  
  1603. 4.5.21 STRETCH
  1604.  
  1605.  
  1606.    STRETCH sets the palette to a gray scale stretched between the two
  1607. specified pixel values.  Stretch is most useful on the PGA display where 16
  1608. gray levels are available.  On the EGA display the stretch command
  1609. activates the gray level palette which provides only 4 gray levels.  Use
  1610. the PAL PS 0 command to return the display to the default palette after
  1611. performing a stretch.
  1612.  
  1613.    STRETCH takes the following keywords :
  1614.  
  1615.     LOW n
  1616.     HIGh n   the low and high DN values of the stretch.
  1617.  
  1618.  
  1619.    These pixel values refer to the DN values in the current image display,
  1620. not necessarily in the original image (scaling may have been involved).
  1621. For example with the EGA display the DN values in the display range from 0
  1622. to 15, even if a byte image is being displayed.
  1623.  
  1624.    The STRETCH command is not recommended for use on EGA systems.
  1625.  
  1626.  
  1627. 4.5.22 SYSTEM
  1628.  
  1629.  
  1630.    The SYSTEM command is used to send a command to MSDOS.
  1631.  
  1632.    For example "SYS L:" will set the L: drive as the current default drive.
  1633. If there is not enough memory available for the system command to be
  1634. executed an error message is displayed.  The SYS command will not work on
  1635. floppy disk systems unless the file "COMMAND.COM" is present on the floppy
  1636. disk with the IMDISP program.
  1637.  
  1638.    The SYSTEM command in this version of IMDISP will attempt to free as
  1639. much of memory as possible, by swapping most of the program to scratch
  1640. space.  It tries to find Extended memory (XMS), Expanded memory (EMS) or
  1641. disk space, in that order.  If it succeeds, only a small amount of IMDISP
  1642. remains in memory, leaving far more memory for DOS functions that previous
  1643. versions.  If the attempt to swap fails, the program will try to swap to
  1644. DOS with the available memory.  Currently, you must have about the same
  1645. amount of free XMS, EMS or disk space as you have memory free before
  1646. running IMDISP (i.e., IMDISP allocates all available memory to itself when
  1647. it starts, and requires that much scratch space when swapping out).
  1648.  
  1649.    The swap process, if it attempts to write out to a scratch disk file,
  1650. will use the directory specified by the environment variable IMBROWSE. If
  1651. IMBROWSE doesn't exist, IMDISP will write the scratch file to the root
  1652. directory of drive C:.  The scratch file is deleted when you return to
  1653. IMDISP (using the EXIT command at the DOS prompt).
  1654.  
  1655.  
  1656. 4.5.23 TEXT
  1657.  
  1658.  
  1659.    The text command can be used to display a string of text on the screen.
  1660. The text string can be entered on the command line, enclosed in
  1661. apostraphies or quotes (e.g., TEXT `This is a text string').  If the text
  1662. string is not entered on the command line the program will prompt for the
  1663. string to be displayed.
  1664.  
  1665.    Once the command is issued and the text string entered the program is
  1666. placed in CURSOR mode so that the display position can be selected. This is
  1667. done by using the arrow keys to move the cursor to the desired location.
  1668. After the position is selected, the user types a period (.) or carriage
  1669. return and the text will be written on the display screen.
  1670.  
  1671.    The TEXT command has one argument and two optional keywords.
  1672.  
  1673.    LINe      The line number to position the text at.
  1674.    SAMple    The sample number to position the text at.
  1675.  
  1676.    'text...' The text string to be printed, enclosed in quotes or
  1677.              apostrophies.
  1678.  
  1679.    The text command writes over image data in the display and refresh
  1680. buffer, thus the underlying portion of the image is lost.
  1681.  
  1682.  
  1683. 4.5.24 TYPE
  1684.  
  1685.  
  1686.    The TYPE command is used to type the contents of a text file on the
  1687. display screen, using the standard MSDOS type command.
  1688.  
  1689.    Its argument is passed to MSDOS for execution.  At the end of the type
  1690. operation the screen will display "Type carriage return to continue:" which
  1691. will return to the IMDISP command mode.  If there is not enough memory
  1692. available for the system command to be executed an error message is
  1693. displayed.
  1694.  
  1695.  
  1696. 4.5.25 NEG
  1697.  
  1698.    The NEG command is used to invert the current color palette, turning the
  1699. image into a negative.   It takes no keywords or arguments.
  1700.  
  1701.  
  1702. 4.5.26 PLOT
  1703.  
  1704.    The PLOT command is used to draw plots of image lines and spectra on the
  1705. screen.  If the current file is an image, you must specify which line you
  1706. wish to plot.
  1707.  
  1708.    PLOT takes the following keywords:
  1709.  
  1710.     LIN n      plot line n of the image (required for 2-D files)
  1711.     SYMbol x   draw the plot using character x instead of connecting the
  1712.                points with a line
  1713.     ZOOm       prompt user to zoom in on a region of the plot after it is
  1714.                drawn
  1715.     OVErlay    overplot - do not erase the current plot
  1716.     MAX n      set the maximum y value in the plot
  1717.     MIN n      set the minimum y value in the plot
  1718.     COLor n    use DN value n to plot the data
  1719.  
  1720.   Example:  to compare lines 200 and 210 of the current image on the same
  1721. vertical scale, first plot line 200 (as a line) with the command
  1722.  
  1723.     PLOT LINE 200 MIN 0 MAX 255
  1724.  
  1725.    Now overlay the plot of line 210 using "+" signs and color 10 of the
  1726. current palette with the command
  1727.  
  1728.     PLOT LINE 210 OVERLAY MIN 0 MAX 255 COLOR 10 SYMBOL +
  1729.  
  1730.  
  1731.  
  1732. 4.6 OTHER UTILITY PROGRAMS
  1733.  
  1734.  
  1735.    There are several utility programs also provided on the distribution
  1736. disk.  These programs can read PDS labeled, VICAR2 labeled, or unlabeled
  1737. images.  The output images are always written with PDS ODL labels.  The
  1738. programs prompt for the necessary input values.
  1739.  
  1740.  
  1741. 4.6.1 COPIM
  1742.  
  1743.  
  1744.    COPIM is a simple image copying program.  It can copy the whole image,
  1745. for example to put PDS labels on a foreign image), or extract a window from
  1746. the image.  It can subsample the image with an integral subsampling factor.
  1747. The program prompts for the input and output file names, the window to
  1748. extract (just type return for the whole image), and the subsampling factor
  1749. (the default is 1).  If the input file is not in VICAR2 or PDS image format
  1750. the program will also prompt for the number of lines and samples, pixel
  1751. size and header size of the image.
  1752.  
  1753.    For example, to extract the first 100 lines and samples from the file
  1754. LOGO.IMG the following commands would be used:
  1755.  
  1756.    COPIM
  1757.    Input Image: LOGO.IMG
  1758.    Lines: 350 Samples: 340 Bits per pixel: 1
  1759.    Output Image: LOGOSUB.IMG
  1760.    Starting line and sample, number of lines and samples:
  1761.    1 1 100 100
  1762.    Line Subsampling factor (1): 1
  1763.    Sample Subsampling factor(1): 1
  1764.  
  1765.  
  1766. 4.6.2 CONVERT
  1767.  
  1768.  
  1769.    CONVERT is simple pixel format conversion program.  It converts an image
  1770. to an integer (16 bits), byte (8 bits), nibble (4 bits), or binary (1 bit)
  1771. image.  It can also perform a user specified scaring.  The program prompts
  1772. for the input and output file names, the output format (must be 1,4,8, or
  1773. 16 bits), and the input and output numerical ranges for scaling.  The
  1774. default scaling values are appropriate for the data types being used.
  1775.  
  1776.    For example, to convert MONTAGE.IMG to an 8-bit per pixel image and
  1777. scale the output pixels evenly between the values of 0 and 127 the
  1778. following commands would be used:
  1779.  
  1780.    CONVERT
  1781.    Input Image: MONTAGE.IMG
  1782.    Lines : 350    Samples : 640 Bits per pixel : 4
  1783.    Output Image: MONTBIG.IMG
  1784.    Output bits per pixel (1, 4, 8, 16) : 8
  1785.    Input DN range (O 15) :
  1786.    Output DN range (O 255) : 0 127
  1787.  
  1788.  
  1789. 4.6.3 CLEANUP
  1790.  
  1791.  
  1792.    The CLEANUP and CLEANUP2 programs are available separately with a user's
  1793. guide, executables and required data files.  The purpose of these programs
  1794. is to clean up "noisy" Voyager images by removing the dark current.  The
  1795. dark current image represents the ambient noise in the camera system;
  1796. therefore, removing this noise "cleans up" the original image, making it
  1797. appear crisper on the monitor.
  1798.  
  1799.  
  1800.                                  Chapter 5
  1801.  
  1802.  
  1803.                               COMMAND SUMMARY
  1804.  
  1805.  
  1806.    Within this command summary listing, brackets ([]) indicate optional
  1807. parameters or keywords.  Filename is the name of a file in the current
  1808. directory or a fully qualified filename which can include drive letter and
  1809. pathname.  Directory name is an MSDOS directory  path specification, a
  1810. valid directory  mask  a specification containing wild card characters (*,
  1811. ?) per MSDOS rules for wildcard use in the DIRECTORY command.  The symbol
  1812. "n" is used to indicate an integer value.
  1813.  
  1814.   BATCH     [filename]
  1815.   BROWSE    [directory mask] [SIZ n] [SUB n] [NOLabel]  [DNLOW n]
  1816.             [DNHIGH n] [PAUse] [ALL] [SELect] [FILe]
  1817.   CD        [directory name] [..]
  1818.   CHDIR     [directory name] [..]
  1819.   CURSOR
  1820.   DIRECTORY [directory mask] [/w]
  1821.   DISPLAY   [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n]
  1822.             [CENT] [DSL n] [DSS n] [FLIP]
  1823.   ERASE
  1824.   EXIT
  1825.   FILE      [filename] ["CD:mm:ss:bb"]
  1826.   HELP      [command name]
  1827.   HISTOGRAM [SUB n] [SL n] [SS n] [NL n] [NS n] [BP n]
  1828.             [CENT]
  1829.   LABEL
  1830.   MENU      [filename]
  1831.   NEG
  1832.   OVERLAY   [MAXLAT n] [MAXLON n] [MINLAT n] [MINLON n]
  1833.             [LEGend]
  1834.   PALETTE   [EDIT n] [PS n] [LOAD filename] [SAVE filename] [DIS] [ERA]
  1835.   PLOT      [LINE n] [SYMBOL x] [COLOR n] [MAX n] [MIN n] [OVERLAY] [ZOOM]
  1836.   PROFILE
  1837.   QUIT
  1838.   REFRESH
  1839.   SAVE      filename [SL n] [SS n] [NL n] [NS n] [BP n]
  1840.   SET       [DNLO n] [DNHI n] [BROwse filename] [DIS name] [NS n]
  1841.   STRETCH   [LO n] [HI n]
  1842.   SYSTEM    [MSDOS command]
  1843.   TEXT      [LINe n] [SAMple n] "text" or 'text'
  1844.   TYPE      filename
  1845.  
  1846.